home *** CD-ROM | disk | FTP | other *** search
/ BMUG Revelations / BMUG Revelations.toast / Programming / Programming Languages / Harvest C / MPW Int & Lib / Interfaces / ConnectionTools.h < prev    next >
Text File  |  1991-04-17  |  2KB  |  119 lines

  1. /*
  2.     File:        ConnectionTools.h
  3.  
  4.     Contains:    C Interface to the Connection Manager Tools
  5.  
  6.     Copyright:    © 1988-1990 by Apple Computer, Inc.
  7.                 All rights reserved.
  8.  
  9. */
  10.  
  11. #ifndef __CONNECTIONTOOLS__
  12. #define __CONNECTIONTOOLS__
  13.  
  14. #ifndef __DIALOGS__
  15. #include <Dialogs.h>
  16. #endif    __DIALOGS__
  17.  
  18. #ifndef __CONNECTIONS__
  19. #include <Connections.h>
  20. #endif    __CONNECTIONS__
  21.  
  22. /* messages for DefProc */
  23.  
  24. #define cmInitMsg             0
  25. #define cmDisposeMsg         1
  26. #define cmSuspendMsg         2
  27. #define cmResumeMsg         3 
  28. #define cmMenuMsg             4 
  29. #define    cmEventMsg            5
  30. #define cmActivateMsg         6
  31. #define cmDeactivateMsg     7
  32.  
  33. #define cmIdleMsg             50
  34. #define    cmResetMsg             51
  35. #define cmAbortMsg             52
  36.  
  37. #define cmReadMsg             100
  38. #define cmWriteMsg             101
  39. #define cmStatusMsg         102
  40. #define cmListenMsg         103
  41. #define cmAcceptMsg         104
  42. #define cmCloseMsg             105
  43. #define cmOpenMsg             106
  44. #define cmBreakMsg             107
  45. #define    cmIOKillMsg            108
  46. #define    cmEnvironsMsg         109
  47.  
  48. /*    messages for validate DefProc    */
  49.  
  50. #define cmValidateMsg    0
  51. #define cmDefaultMsg    1
  52.     
  53.     
  54. /*    messages for Setup DefProc    */
  55.  
  56. #define cmSpreflightMsg    0
  57. #define cmSsetupMsg        1
  58. #define cmSitemMsg        2
  59. #define cmSfilterMsg    3
  60. #define cmScleanupMsg    4
  61.     
  62.     
  63. /*    messages for scripting defProc    */
  64.  
  65. #define cmMgetMsg        0
  66. #define cmMsetMsg        1
  67.     
  68.  
  69. /*    messages for localization defProc    */
  70.  
  71. #define cmL2English        0
  72. #define cmL2Intl        1
  73.  
  74.  
  75. /*    private data constants */
  76.  
  77. #define cdefType    'cdef'        /* main connection definition procedure    */
  78. #define cvalType    'cval'        /* validation definition procedure    */
  79. #define csetType    'cset'        /* connection setup definition procedure    */
  80. #define clocType    'cloc'        /* connection configuration localization defProc    */
  81. #define cscrType    'cscr'        /* connection scripting defProc interfaces    */
  82.  
  83. #define cbndType    'cbnd'        /* bundle type for connection    */
  84. #define cverType    'vers'    
  85.  
  86.  
  87. struct CMCompletorRecord {
  88.     Boolean    async;
  89.     ProcPtr    completionRoutine;
  90. };
  91.  
  92. typedef struct CMCompletorRecord CMCompletorRecord;
  93.  
  94. typedef CMCompletorRecord *CMCompletorPtr;
  95.  
  96.  
  97. struct CMSetupStruct {
  98.     DialogPtr theDialog;
  99.     short count;
  100.     Ptr theConfig;
  101.     short    procID;
  102. };
  103.  
  104. typedef struct CMSetupStruct CMSetupStruct;
  105.  
  106. typedef CMSetupStruct *CMSetupPtr;
  107.  
  108.  
  109. struct CMDataBuffer {
  110.     Ptr        thePtr;
  111.     long    count;
  112.     CMChannel channel;
  113.     CMFlags    flags;
  114. };
  115. typedef struct CMDataBuffer CMDataBuffer;
  116.  
  117. typedef CMDataBuffer *CMDataBufferPtr;
  118.  
  119. #endif __CONNECTIONTOOLS__